<template>
	<view class="wuliu"
		style="height: 100%;"
		:style="'background: url('+ c_imgPath + 'shouye/indexBg.png'+ ') repeat-y 0 0 / 100% auto;'"
		>
		<view class="status">
			<view class="status_image">
				<image :src="imgurl.goodslist_imgurl"></image>
				<view class="status_foot">共{{imgurl.count}}件商品</view>
			</view>
			<view>
				<view class="sta_1">物流状态：<text>{{imgurl.delivery_status}}</text></view>
				<view class="sta_2">快递公司：{{imgurl.courier_name}}</view>
				<view class="sta_3">快递单号：{{imgurl.courier_number}}<text @click="copy(imgurl.courier_number)">复制</text>
				</view>
			</view>
		</view>

		<view class="news_z" v-if="tracesData.length > 0">
			<view v-for="(item,index) in tracesData" :key="index" class="con">
				<view class="con_l">
					<view :class="index==0?'yuan2':'yuan'">
						<view v-if="index==0" class="yuan3"></view>
					</view>
				</view>
				<view class="con_r" :style="index==0?'color:#333333':''">
					<view class="title" :style="index==0?'font-size:28rpx':''">{{item.status}}</view>
					<view class="time">{{item.time}}</view>
				</view>
			</view>
		</view>


	</view>

</template>

<script>
	export default {

		data() {
			return {
				c_imgPath:'https://qt.yhemall.com/',
				tracesData: [],
				imgurl: {}

			}
		},
		onLoad(e) {

			this.getData(e.id)
		},
		methods: {

			getData(e) {
				let that = this;
				that.req({
					url: 'warehouse_order_logistics',
					data: {
						id: e
					},
					success(res) {
						if (res.status == 1) {
							that.imgurl = res.data
							that.tracesData = res.data.delivery_list
						}

					}
				})
			},
			copy(value) {

				uni.setClipboardData({
					data: value, //要被复制的内容
					success: () => { //复制成功的回调函数
						uni.showToast({ //提示
							title: "复制成功"
						})
					}
				});

			}
		}

	}
</script>

<style>
	.qiehuan_line {
		margin: -10rpx auto;
		width: 30rpx;
		height: 20rpx;
		border-bottom: 2rpx solid #B07CDD;
		border-radius: 2rpx;
	}

	.news_z {
		width: 690rpx;
		margin: 20rpx auto 0;
		/* background: #FFFFFF; */
		border-radius: 20rpx;
		/* 	background: #11141D; */
		border: 1px solid #fff;
		border-radius: 10rpx;
		/* box-shadow: 0px 0px 10rpx 0px rgba(254, 0, 50, 0.7); */
	}

	.yuan3 {
		width: 24rpx;
		height: 24rpx;
		background: #B07CDD;
		border-radius: 50%;
	}

	.yuan2 {
		background: rgba(#B07CDD, 0.3);
		width: 40rpx;
		height: 40rpx;
		border-radius: 50%;
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.time {
		color: #989898;
		margin-top: 20rpx;
	}

	.con_l {
		width: 120rpx;
		display: flex;
		justify-content: center;
		align-items: center;
		/* border: 1px solid red; */
	}

	.title {
		color: #FFFFFF;
		line-height: 36rpx;
	}

	.con_r {
		width: 600rpx;
		font-size: 24rpx;
		border-bottom: 1rpx solid #333333;
		padding: 20rpx 0;
		margin-right: 20rpx;
	}

	.yuan {
		width: 24rpx;
		height: 24rpx;
		background: #dddddd;
		border-radius: 50%;
	}

	.con {
		display: flex;
		align-items: center;
		width: 100%;
	}

	.sta_3 text {
		border: 1px solid #B07CDD;
		color: #B07CDD;
		border-radius: 6rpx;
		font-size: 20rpx;
		margin-left: 24rpx;
		padding: 2rpx 10rpx;
	}

	.sta_2,
	.sta_3 {
		font-size: 24rpx;
		color: #FFFFFF;
		margin-top: 24rpx;
	}

	.sta_1 text {
		color: #B07CDD;
	}

	.sta_1 {
		font-size: 28rpx;
		color: #FFFFFF;
		margin-top: 10rpx;
	}

	.status_foot {
		position: absolute;
		bottom: 0;
		left: 0;
		font-size: 24rpx;
		color: #FFFFFF;
		border-radius: 0 0 10rpx 10rpx;
		background: #B07CDD;
		width: 100%;
		height: 40rpx;
		text-align: center;
	}

	.status image {
		width: 170rpx;
		height: 170rpx;
		border-radius: 10rpx;
	}

	.status_image {
		width: 170rpx;
		height: 170rpx;
		margin-right: 34rpx;
		border-radius: 10rpx;
		position: relative;
	}

	.status {
		width: 690rpx;
		margin: 20rpx auto;
		/* height: 212rpx; */
		/* background: #FFFFFF; */
		padding: 24rpx 24rpx 48rpx 24rpx;
		box-sizing: border-box;
		display: flex;
		border-radius: 10rpx;
		/* background: #11141D; */
		border: 1px solid #fff;
		/* border-radius: 10rpx; */
		/* box-shadow: 0px 0px 10rpx 0px rgba(150, 255, 254, 0.7); */
	}

	.wuliu {
		width: 100vw;
		min-height: 100vh;
		padding-bottom: 100rpx;
		box-sizing: border-box;
		padding-top: 1rpx;
	}
</style>
